function myInstanceof(obj, func) {
    //获取对象的原型
    let protos = Object.getPrototypeOf(obj)
    //获取构造函数的prototype
    let proto = func.prototype

    while(protos) {
        if(protos == proto) {
            return true
        } else {
            protos = Object.getPrototypeOf(protos)
        }
    }

    return false
}

// console.log(myInstanceof([], Array))

function test(...elements) {
    console.log(elements)
}

// test(1,2,3)

let obj = {name: 'kaho', age: 28}
const {name: nam} = obj


const str = 'name=123'

obj['main'] = str

// console.log(obj)
// Object.keys(obj).forEach(item => console.log(item))

let a, b
let c = 1
a = b = c
console.log(a, b, c)